<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="billing.aspx.cs" Inherits="billing" Title="Billing Information" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ddlstShipVia" EventName="SelectedIndexChanged">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblShipPrice" />
                    <telerik:AjaxUpdatedControl ControlID="lblSubTotal" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnReset" EventName="Click">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="txtFirstName" />
                    <telerik:AjaxUpdatedControl ControlID="txtLastName" />
                    <telerik:AjaxUpdatedControl ControlID="txtStreetAddress" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>


<table style="margin:10px auto" cellpadding="10" width="520">
    <tr>
        <td colspan="3" style="text-align:center">
            <h1 style="font-family:Candara; font-style:italic; font-size:25px; border-bottom-style:double; color:blue; letter-spacing:3px">
                Checkout : Billing Information
            </h1>
        </td>        
    </tr>    
    <tr>
        <td>
            First Name:
        </td>
        <td colspan="2">
            <asp:TextBox ID="txtFirstName" runat="server" Width="200px"/>
        </td>
    </tr>
    <tr>
        <td>
            Last Name:
        </td>
        <td colspan="2">
            <asp:TextBox ID="txtLastName" runat="server" Width="200px"/>
        </td>
    </tr>    
    <tr>
        <td>
            Street Address:
        </td>
        <td colspan="2">
            <asp:TextBox ID="txtStreetAddress" runat="server" Width="200px"/>
        </td>
    </tr>    
    <tr>
        <td>
            City:
        </td>
        <td colspan="2">                        
                <asp:DropDownList ID="ddlstCity" runat="server" Width="200px">
                    <asp:ListItem Text="Ho Chi Minh" Value="Ho Chi Minh" />
                    <asp:ListItem Text="Nha Trang" Value="Nha Trang" />
                    <asp:ListItem Text="Da Nang" Value="Da Nang" />
                    <asp:ListItem Text="Hue" Value="Hue" />
                    <asp:ListItem Text="Nghe An" Value="Nghe An" />
                    <asp:ListItem Text="Thanh Hoa" Value="Thanh Hoa" />
                    <asp:ListItem Text="Ha Noi" Value="Ha Noi" />
                    <asp:ListItem Text="Hai Phong" Value="Hai Phong" />
                    <asp:ListItem Text="Mu Kang Chai" Value="Mu Kang Chai" />                         
                </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td>
            Ship via:
        </td>
        <td >
            <asp:RadioButtonList ID="radioShip" runat="server" AutoPostBack="True" 
                                OnSelectedIndexChanged="radioShip_SelectedIndexChanged" 
                                DataSourceID="ObjectDataSource1" DataTextField="ShipVia" DataValueField="ShipPrice">
            </asp:RadioButtonList>
            
        </td>
        <td style="text-align:left;">
            <asp:Label ID="lblShipPrice" runat="server" ForeColor="Red"/>            
        </td>
    </tr>
</table>
<table width="520" style="margin:0 auto;" cellpadding="5">
    <tr>
        <td style="width:170px">
            Your subtotal:
        </td>
        <td style="text-align:left">
            <asp:Label ID="lblSubtotal" runat="server" ForeColor="Red" />
        </td>
    </tr>
    <tr style="text-align:center">
        <td colspan="2">
            <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
            <asp:Button ID="btnReset" runat="server" Text="Reset" OnClick="btnReset_Click" />
        </td>
    </tr>    
</table>

<telerik:RadInputManager ID="radInputManager" runat="server">
    <telerik:TextBoxSetting BehaviorID="normalTextBox" Validation-IsRequired="true">
        <TargetControls>
            <telerik:TargetInput ControlID="txtFirstName" />
            <telerik:TargetInput ControlID="txtLastName" />
            <telerik:TargetInput ControlID="txtStreetAddress" />
        </TargetControls>
    </telerik:TextBoxSetting>    
</telerik:RadInputManager>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAll"
        TypeName="Bll.ShipBll"></asp:ObjectDataSource>



</asp:Content>

